package com.jron.cqiu.util;

import org.apache.commons.proxy.ProxyFactory;
import com.jron.cqiu.kernel.process.IProcess;
import com.jron.cqiu.kernel.process.ProcessProxy;
import com.jron.cqiu.kernel.implement.crossos.jnative.JNativeProcess;
import com.jron.cqiu.kernel.implement.windows.winp.WinpProcess;
import com.jron.cqiu.kernel.implement.crossos.jna.JnaRegist;
import com.jron.cqiu.kernel.implement.crossos.jna.HotKeyRegister;
import com.jron.cqiu.kernel.implement.*;
import com.jron.cqiu.kernel.regist.IRegist;
import com.jron.cqiu.kernel.regist.IAutorun;
import com.jron.cqiu.kernel.regist.Autorun;
import com.jron.cqiu.kernel.mail.IMail;
import com.jron.cqiu.kernel.mail.IMailOrder;
import com.jron.cqiu.kernel.persistence.IPersistence;
import com.jron.cqiu.kernel.persistence.IMailDao;
import com.jron.cqiu.kernel.execution.IExecution;
import com.jron.cqiu.kernel.execution.ExecutionProxy;
import com.jron.cqiu.kernel.scheduler.KingTrigger;
import com.jron.cqiu.kernel.scheduler.IKingTrigger;
import com.jron.cqiu.kernel.cmdline.*;
import com.jron.cqiu.kernel.handlers.IHotKeyRegister;

/**
 * Created by Intellij IDEA.
 *
 * @Author: Yejw
 * @Date: 2008-6-16
 * @Time: 14:37:40
 * <p/>
 * (IProcess) PROXY.createDelegatorProxy(new ConstantProvider(new WinpProcess()), new Class[]{IProcess.class});
 */
public interface Instance {

    /** 默认代理工厂 */
    ProxyFactory PROXY = new ProxyFactory();

    //==================================================================================================================

    /** 获取IProcess 代理实现 */
    public IProcess PROCESS_PROXY_INSTANCE = new ProcessProxy();

    /** 获取IProcess JNative实现 */
    IProcess PROCESS_JNATIVE_INSTANCE = new JNativeProcess();

    /** 获取IProcess winp实现 */
    IProcess PROCESS_WINP_INSTANCE = new WinpProcess();

    /** IRegist JNA实现 */
    IRegist REGIST_JNA_INSTANCE = new JnaRegist();

    /** IAutorun 默认实现 */
    IAutorun AUTORUN_INSTANCE = new Autorun();

    /** IMail 默认实现 */
    IMail MAIL_INSTANCE = new Mail();

    /** ICommander 默认实现 */
    IMailOrder MAIL_ORDER_INSTANCE = new MailOrder();

    /** IPersistence 默认实现 */
    IPersistence PERSISTENCE_INSTANCE = new SqlitePersistence();

    /** IMailDao 默认实现 */
    IMailDao MAILDAO_INSTANCE = new MailDao();

    /** IExecution 代理实现 */
    IExecution EXECUTION_PROXY_INSTANCE = new ExecutionProxy();

    /** KingTrigger */
    IKingTrigger KINGTRIGGER_INSTANCE = new KingTrigger();

    /** KingCommand */
    IKingCommand KINGCOMMAND_INSTANCE = new Command();

    /** ICommandLineListener */
    ICommandLineListener COMMANDLINE_LISTENER_INSTANCE = new CommandLineListener();

    /** ICommandObserver */
    ICommandObserver COMMAND_OBSERVER_INSTANCE = new CommandObserver(System.in, COMMANDLINE_LISTENER_INSTANCE);

    /** IHotKeyRegister */
    IHotKeyRegister HOTKEY_REGISTER_INSTANCE = new HotKeyRegister();
}
